<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%><!DOCTYPE HTML>
<%-- <%@include file="edit.jsp"%> --%>
<html>
<head>
<body>
<table id="userGrid" class="easyui-datagrid" title="用户" style="width:700px;height:500px"
            data-options="pagination:true,rownumbers:true,singleSelect:true,method:'post',toolbar:'#tb' ">
        <thead>
            <tr>
            	<th data-options="field:'ck',checkbox:true"></th>
                <th data-options="field:'id',width:80">id</th>
                <th data-options="field:'nickname',width:100">昵称</th>
                <th data-options="field:'username',width:80,align:'right'">用户名</th>
                <th data-options="field:'phoneNumber',width:100">联系电话</th>
                <th data-options="field:'description',width:100">简介</th>
                <th data-options="field:'speack',width:100">作者对话</th>
            </tr>
        </thead>
    </table>
    <div id="tb" style="padding:2px 5px;">
        	作者 <input id="userName" class="easyui-textbox" prompt="请输入用户名或昵称" style="width:180px">
        	<!-- 作者类型: 
        <select id="user_type" class="easyui-combobox" panelHeight="auto" style="width:100px">
            <option value="3">普通用户</option>
            <option value="5">大咖用户</option>
        </select> -->
        <a href="#" id="searchUser" class="easyui-linkbutton" iconCls="icon-search">搜索</a>
    </div>
    <script type="text/javascript">
    	$(function(){
    		$('#userGrid').datagrid({
    			onSelect:selectUser
    		});
    		$("#searchUser").on('click',function(){
    			var username = $("#userName").val();
    			var type = $("#user_type").val();
    			var item = {};
    			item.nickname =username;
    			item.username = username;
    			item.type = type;
				$('#userGrid').datagrid({queryParams: item,url:'/admin/user/page'});
				//$('#article_datagrid').datagrid('reload');  
    		});
    		function selectUser(){
    			var row = $('#userGrid').datagrid("getSelected");
    			top.$window.close(window,1,row);
    		}
    	});
    </script>
</body>
</html>